<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | Author: allen.qiang
// +----------------------------------------------------------------------

/**
 * 支付宝同步接收控制器
 * @package  onlinepay
 * @author   allen.qiang
 * @version 1.0
 */

require('core/shop.php');
quanli_require('module/base/system/sysPayment.class.php');
quanli_include('module/base/common/quanliOnlinepay.class.php');


//实例支付类
$ebsigOnlinepay = new quanliOnlinepay();

//实例支付方式类
$sysPayment = new sysPayment();

//实例seo类
$seo = new seo();

//接收返回参数
$ebsigOnlinepay->receiveParameter();

//订单号
$bill_no = $ebsigOnlinepay->getParameter('out_trade_no');


if ($ebsigOnlinepay->getParameter('result ') != 'success') {
    $shop_array['success'] = 0;
} else {
    $shop_array['success'] = 1;
}

//保存客户端返回数据
$ebsigOnlinepay->setReceiveParams( $bill_no, 2);

//生成seo信息
$shop_array['seo'] = $seo->shopSeo('订单支付成功页');

//页面值
$shop_array['page_name'] = 'payment_online_success';

$G_SHOP->smarty->assign_by_ref('shop_array', $shop_array);

$G_SHOP->smarty->display('payment_online_close.tpl');